(function() {
	var skill = {
		save: function() {
			db.update(db_table_name, this._id, this);
		},
		destroy: function() {
			db.remove(db_table_name, this._id);
		},
		changeVcode: function() {
			//生成不重复的申请码
			do {
				this.vcode = Math.random().toString().substr(2, 4);
			} while (
				db.find_one(db_table_name, {
					vcode: this.vcode
				})
			);
			this.save();
			return this.vcode;
		}
	}
	module.exports = skill;

	var db = require("../db/index");
	var UserCon = require("./_con");
	var BusCon = require("../bus/_con");
	var GoodsCon = require("../goods/_con");
	var AchCon = require("../ach/_con");
	var PayAchCon = require("../pay_ach/_con");
	var CommentCon = require("../comment/_con");
	var EvaluationCon = require("../eval/_con");
	var ClassifyCon = require("./_con");
	var config = require("../_include/config");
	var data_cut = require("../_include/data_cut");
	var $Array = require("../_include/$.Array");
	var $Object = require("../_include/$.Object");
	var helper = require("../_include/helper");
	var db_table_name = config.dbname.assshop;
	var db_id_prefix = config.dbIdPrefix.assshop;


}());